import request from '@/utils/request'

// 查询心愿列表
export function listHeartfelt(query) {
  return request({
    url: '/system/heartfelt/list',
    method: 'get',
    params: query
  })
}

// 查询心愿详细
export function getHeartfelt(id) {
  return request({
    url: '/system/heartfelt/' + id,
    method: 'get'
  })
}

// 新增心愿
export function addHeartfelt(data) {
  return request({
    url: '/system/heartfelt',
    method: 'post',
    data: data
  })
}

// 修改心愿
export function updateHeartfelt(data) {
  return request({
    url: '/system/heartfelt',
    method: 'put',
    data: data
  })
}

// 删除心愿
export function delHeartfelt(id) {
  return request({
    url: '/system/heartfelt/' + id,
    method: 'delete'
  })
}
